package com.hoshiicloud.user.service.company;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hoshiicloud.common.exception.ServiceException;
import com.hoshiicloud.user.entity.company.AttachmentType;
import org.apache.ibatis.annotations.Param;
import org.hibernate.persister.entity.AbstractEntityPersister;

import java.util.List;

/**
 * <p>
 * 附件类型 服务类
 * </p>
 *
 * @author WGJ
 * @since 2019-04-22
 */
public interface IAttachmentTypeService extends IService<AttachmentType> {

    /**
     * 根据id获取
     *
     * @param id ID
     * @return AttachmentType
     */
    AttachmentType getById(Long id);

    /**
     * 根据一组id获取
     *
     * @param ids id组
     * @return List<AttachmentType>
     */
    List<AttachmentType> getByIds(List<Long> ids);

    /**
     * 保存
     *
     * @param entity 实体对象
     * @return Long
     */
    Long insert(AttachmentType entity) throws ServiceException;

    /**
     * 修改
     *
     * @param entity 实体对象
     * @return Long
     */
    Long update(AttachmentType entity) throws ServiceException;



    /**
     * 删除
     *
     * @param id ID
     * @return boolean
     */
    boolean delete(Long id) throws ServiceException;



    /**
     * 根据附件类型信息进行分页查询
     * @param page
     * @param queryWrapper
     * @param key
     * @return
     */
    IPage<AttachmentType> getPage(IPage<AttachmentType> page, QueryWrapper<AttachmentType> queryWrapper, String key);

    /**
     *@Author:campchen
     *@Description:
     *@Date:下午 02:29 2019/9/18
     *@Param:
     *@return:
     */
    List<AttachmentType> selectAttachmentTypeByCategoryIdOrOrganizationTypeId(List<Long> categoryIds,Long organizationTypeId);
}
